package com.partterns.factory;

/**
 * 创建一个工厂制造器/生成器类
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
       if(choice==null){
           return null;
       }
       if(choice.equalsIgnoreCase("SHAPE")){
           return new ShapeFactoryAbs();
       }else if(choice.equalsIgnoreCase("COLOR")){
           return new ColorFactoryAbs();
       }
       return null;
    }
}
